﻿@model IEnumerable<HawaiRestaurant.Models.DataContext.Staff>

@{
    ViewBag.Title = "ListStaff";
    Layout = "~/Views/Shared/_LayoutAdmin.cshtml";
}
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.dataTables.js")" type="text/javascript"></script>
@section MyOtherJavascript {
    <script type="text/javascript">
        $(document).ready(function() {
            $('#staff').dataTable();
        });
    </script>
}
<h2>List Staff</h2>

<p>
    @Html.ActionLink("Create New", "CreateStaff")
</p>

<table cellpadding="0" cellspacing="0" border="0" class="display" id="staff">
	<thead>
		 <tr>
        <th>
            Name 
        </th>
        <th>
            PhoneNumber
        </th>
        <th>
            Address
        </th>
        <th>
            IsAdmin
        </th>
        <th>
            UserName
        </th>
             <th></th>
             <th></th>
    </tr>
	</thead>
	<tbody>
		
		@foreach (var item in Model) {
   <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Name)
        </td>
       <td>
           @Html.DisplayFor(modelItem => item.PhoneNumber)
       </td>
        <td>
            @Html.DisplayFor(modelItem => item.Address)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.IsAdmin)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.UserName)
        </td>
       <td>
           @Html.ActionLink("Edit", "EditStaff", new { id=item.StaffId },new { @class = "useredit"}) 
          
       </td>
       <td>
             @Html.ActionLink("Delete", "DeleteStaff", new { id = item.StaffId }, new { @class = "userdelete" })
       </td>
    </tr>
}

	</tbody>
	
</table>







